#include "ONB.h"

ONB::ONB(const Vector& a, const Vector& b, const Vector& _o)
{
  InitAsUW(a,b);
  o = _o;
};

void ONB::InitAsUW(const Vector& a, const Vector& b)
{
  u = a;
  u.Unitize();

  w = a^b;
  w.Unitize();

  v = w^u;
};

void ONB::InitAsWV(const Vector& a, const Vector& b)
{
  w = a;
  w.Unitize();

  u = b^a;
  u.Unitize();

  v = w^u;
};
